﻿<div class="editor-label">
    Chair
</div>
@Html.DropDownList("Chairs", (IEnumerable<SelectListItem>)ViewBag.Chairs)
<br />
<div class="editor-label">
    Degree
</div>
@Html.DropDownList("Degrees", (IEnumerable<SelectListItem>)ViewBag.Degrees)

<br />

<button id="create" class='btn'>Create</button>

<script>
    (function () {
        $("#create").click(function () {
            var chair = $("#Chairs")[0].value;
            var degree = $("#Degrees")[0].value;
            var data = { Chair: chair, Degree: degree };
            $.post("/User/CreateProfessor", data);
        });
    })();
</script>
